<?php

/**
 * Page models
 *
 * Page models in console
 *
 * PHP Version: 1.2.3
 *
 * @author Johari <joharijumali@gmail.com>
 */

/**
 * Class Page
 *
 * Class Page in console models
 *
 * @author Johari <joharijumali@gmail.com>
 */

class Console_Page extends Eloquent
{

    public static $timestamps = true;
    public static $table = 'sys_modul_page';
    public static $key = 'smp_id';


	/**
     * Function currentPageID
	 *
	 * @return navpages.
     */
	public static function currentPageID()
	{
    	$path = URI::segment(2).'/'.URI::segment(3).'/'.URI::segment(4);

    	$page = Console_Page::where('smp_modul','=',URI::segment(2))
                            ->where('smp_controller','=',URI::segment(3))
                            ->where('smp_action','=',URI::segment(4))->first()->smp_id;

        return $page;
	}

}

?>